﻿using Newtonsoft.Json;
using SqlSugar;
using System.Collections.Generic;
using System.Threading.Tasks;
using System;
 

namespace OrmTest
{
    public class Unitadfafasfa1
    {

        static string connStr =Config.ConnectionString;
        protected static SqlSugarScope db = new SqlSugarScope(new ConnectionConfig()
        {
            DbType = DbType.PostgreSQL,
            ConnectionString = connStr,
            IsAutoCloseConnection = true,
            ConfigId = "web",
            LanguageType = LanguageType.Default,//Set language

            SlaveConnectionConfigs = new List<SlaveConnectionConfig>() {
                new SlaveConnectionConfig() { HitRate = 10, ConnectionString = connStr }
            },
            MoreSettings = new ConnMoreSettings()
            {
                PgSqlIsAutoToLower = false,
                PgSqlIsAutoToLowerCodeFirst = false,
                IsAutoRemoveDataCache = true
            },
            AopEvents = new AopEvents
            {
                OnLogExecuting = (sql, p) =>
                {
                    Console.WriteLine(UtilMethods.GetNativeSql(sql, p));
                }
            }
        });
        public static  void Init()
        {
            db.CodeFirst.InitTables<testModel>();

            //# 2024-12-24 11:08:04
            var json = "[{\"channel\":1,\"day1\":[17377,2692,17415,2413,196,33,11,0,1,0,0,0,0],\"day2\":[17359,2683,17396,2408,194,33,10,0,1,0,0,0,0],\"day3\":[17342,2679,17379,2405,193,33,10,0,1,0,0,0,0],\"day4\":[17327,2678,17364,2404,193,33,10,0,1,0,0,0,0],\"day5\":[17313,2670,17350,2401,188,33,10,0,1,0,0,0,0],\"day6\":[17296,2664,17333,2397,186,33,10,0,1,0,0,0,0],\"day7\":[17287,2654,17324,2389,185,33,10,0,0,0,0,0,0],\"day15\":[17163,2610,17200,2354,177,32,10,0,0,0,0,0,0]},{\"channel\":2,\"day1\":[19695,2429,19731,2343,47,2,1,0,0,0,0,0,0],\"day2\":[19688,2429,19724,2343,47,2,1,0,0,0,0,0,0],\"day3\":[19676,2428,19712,2342,47,2,1,0,0,0,0,0,0],\"day4\":[19662,2428,19698,2342,47,2,1,0,0,0,0,0,0],\"day5\":[19659,2428,19695,2342,47,2,1,0,0,0,0,0,0],\"day6\":[19654,2428,19690,2342,47,2,1,0,0,0,0,0,0],\"day7\":[19651,2428,19687,2342,47,2,1,0,0,0,0,0,0],\"day15\":[19592,2424,19628,2339,46,2,1,0,0,0,0,0,0]},{\"channel\":3,\"day1\":[411,128,418,42,36,9,17,11,4,1,1,0,0],\"day2\":[409,127,416,42,35,9,17,11,4,1,1,0,0],\"day3\":[409,127,416,42,35,9,17,11,4,1,1,0,0],\"day4\":[409,127,416,42,35,9,17,11,4,1,1,0,0],\"day5\":[409,127,416,42,35,9,17,11,4,1,1,0,0],\"day6\":[409,126,416,42,35,9,17,10,4,1,1,0,0],\"day7\":[409,126,416,42,35,9,17,10,4,1,1,0,0],\"day15\":[406,125,413,42,35,8,17,10,4,1,1,0,0]},{\"channel\":4,\"day1\":[467579,24011,469243,20541,1010,426,244,80,30,7,6,3,0],\"day2\":[466881,23953,468543,20503,1004,422,239,77,30,7,6,3,0],\"day3\":[466222,23905,467882,20465,999,421,238,76,30,7,6,3,0],\"day4\":[465581,23857,467239,20428,997,417,236,75,30,7,6,3,0],\"day5\":[464882,23821,466537,20398,994,417,236,75,30,7,6,3,0],\"day6\":[463963,23754,465614,20346,989,415,235,74,28,7,6,3,0],\"day7\":[462977,23706,464622,20310,985,415,234,74,28,7,5,3,0],\"day15\":[442887,23146,444469,19891,942,404,221,67,24,7,5,3,0]},{\"channel\":5,\"day1\":[250238,12820,250740,11546,603,70,53,38,6,0,1,1,0],\"day2\":[250001,12797,250502,11526,602,70,53,37,6,0,1,1,0],\"day3\":[249784,12776,250283,11512,598,70,53,36,6,0,1,1,0],\"day4\":[249579,12761,250078,11499,597,70,53,36,5,0,1,1,0],\"day5\":[249357,12743,249856,11482,596,70,53,36,5,0,1,1,0],\"day6\":[249040,12714,249536,11458,594,70,53,36,5,0,1,1,0],\"day7\":[248749,12700,249244,11447,592,70,53,36,5,0,1,1,0],\"day15\":[242781,12509,243261,11288,576,70,53,36,5,0,1,0,0]},{\"channel\":6,\"day1\":[16855,736,16899,643,42,3,3,1,0,0,0,0,0],\"day2\":[16844,734,16888,643,41,2,3,1,0,0,0,0,0],\"day3\":[16836,734,16880,643,41,2,3,1,0,0,0,0,0],\"day4\":[16825,733,16869,642,41,2,3,1,0,0,0,0,0],\"day5\":[16812,733,16856,642,41,2,3,1,0,0,0,0,0],\"day6\":[16806,733,16850,642,41,2,3,1,0,0,0,0,0],\"day7\":[16797,730,16841,639,41,2,3,1,0,0,0,0,0],\"day15\":[16713,719,16757,629,40,2,3,1,0,0,0,0,0]},{\"channel\":7,\"day1\":[32702,1754,32744,1644,59,7,2,0,0,0,0,0,0],\"day2\":[32628,1750,32670,1641,58,7,2,0,0,0,0,0,0],\"day3\":[32598,1748,32640,1639,58,7,2,0,0,0,0,0,0],\"day4\":[32571,1748,32613,1639,58,7,2,0,0,0,0,0,0],\"day5\":[32528,1746,32570,1637,58,7,2,0,0,0,0,0,0],\"day6\":[32479,1742,32521,1633,58,7,2,0,0,0,0,0,0],\"day7\":[32387,1738,32429,1630,57,7,2,0,0,0,0,0,0],\"day15\":[31954,1720,31995,1614,56,7,2,0,0,0,0,0,0]},{\"channel\":8,\"day1\":[21602,2198,21645,2084,57,5,6,3,0,0,0,0,0],\"day2\":[21577,2196,21620,2082,57,5,6,3,0,0,0,0,0],\"day3\":[21551,2194,21594,2080,57,5,6,3,0,0,0,0,0],\"day4\":[21528,2192,21571,2078,57,5,6,3,0,0,0,0,0],\"day5\":[21502,2188,21545,2074,57,5,6,3,0,0,0,0,0],\"day6\":[21469,2185,21512,2072,56,5,6,3,0,0,0,0,0],\"day7\":[21437,2180,21480,2067,56,5,6,3,0,0,0,0,0],\"day15\":[21215,2158,21258,2046,55,5,6,3,0,0,0,0,0]},{\"channel\":9,\"day1\":[5025,133,5030,113,11,3,1,0,0,0,0,0,0],\"day2\":[5024,133,5029,113,11,3,1,0,0,0,0,0,0],\"day3\":[5024,133,5029,113,11,3,1,0,0,0,0,0,0],\"day4\":[5023,133,5028,113,11,3,1,0,0,0,0,0,0],\"day5\":[5022,133,5027,113,11,3,1,0,0,0,0,0,0],\"day6\":[5021,132,5025,113,11,3,1,0,0,0,0,0,0],\"day7\":[5021,132,5025,113,11,3,1,0,0,0,0,0,0],\"day15\":[5010,130,5014,111,11,3,1,0,0,0,0,0,0]},{\"channel\":10,\"day1\":[700,147,733,63,29,7,7,3,3,0,2,0,0],\"day2\":[698,147,731,63,29,7,7,3,3,0,2,0,0],\"day3\":[695,147,728,63,29,7,7,3,3,0,2,0,0],\"day4\":[693,147,726,63,29,7,7,3,3,0,2,0,0],\"day5\":[693,147,726,63,29,7,7,3,3,0,2,0,0],\"day6\":[691,147,724,63,29,7,7,3,3,0,2,0,0],\"day7\":[690,147,723,63,29,7,7,3,3,0,2,0,0],\"day15\":[683,145,716,63,29,5,7,3,3,0,2,0,0]},{\"channel\":11,\"day1\":[2642,589,2717,254,146,39,35,22,10,5,1,2,0],\"day2\":[2640,589,2715,254,146,39,35,22,10,5,1,2,0],\"day3\":[2639,588,2714,254,146,39,35,22,10,4,1,2,0],\"day4\":[2638,586,2713,252,146,39,35,22,10,4,1,2,0],\"day5\":[2634,586,2709,252,146,39,35,22,10,4,1,2,0],\"day6\":[2633,585,2708,251,146,39,35,22,10,4,1,2,0],\"day7\":[2633,585,2708,251,146,39,35,22,10,4,1,2,0],\"day15\":[2621,581,2696,249,144,39,35,22,10,4,1,2,0]},{\"channel\":12,\"day1\":[8331,244,8340,188,35,8,4,0,0,0,0,0,0],\"day2\":[8323,243,8332,187,35,8,4,0,0,0,0,0,0],\"day3\":[8321,243,8330,187,35,8,4,0,0,0,0,0,0],\"day4\":[8319,243,8328,187,35,8,4,0,0,0,0,0,0],\"day5\":[8317,241,8326,185,35,8,4,0,0,0,0,0,0],\"day6\":[8310,240,8319,185,35,8,3,0,0,0,0,0,0],\"day7\":[8303,240,8312,185,35,8,3,0,0,0,0,0,0],\"day15\":[8287,239,8296,184,35,8,3,0,0,0,0,0,0]},{\"channel\":13,\"day1\":[359268,20840,360285,18294,850,302,251,79,31,10,5,1,0],\"day2\":[358990,20810,360007,18274,847,299,250,77,31,9,5,1,0],\"day3\":[358716,20794,359732,18261,846,298,250,77,31,9,5,1,0],\"day4\":[358460,20775,359474,18247,844,298,249,77,31,9,5,1,0],\"day5\":[358193,20759,359206,18235,841,298,249,77,31,9,5,1,0],\"day6\":[357856,20736,358868,18217,840,296,248,77,31,9,5,1,0],\"day7\":[357495,20712,358506,18197,840,294,247,77,31,9,5,1,0],\"day15\":[352543,20509,353539,18041,824,286,243,76,28,9,5,1,0]},{\"channel\":14,\"day1\":[1714,86,1735,36,21,1,5,1,1,0,0,0,0],\"day2\":[1709,85,1730,36,20,1,5,1,1,0,0,0,0],\"day3\":[1709,84,1730,35,20,1,5,1,1,0,0,0,0],\"day4\":[1708,84,1729,35,20,1,5,1,1,0,0,0,0],\"day5\":[1703,84,1724,35,20,1,5,1,1,0,0,0,0],\"day6\":[1701,84,1722,35,20,1,5,1,1,0,0,0,0],\"day7\":[1700,84,1721,35,20,1,5,1,1,0,0,0,0],\"day15\":[1681,84,1702,35,20,1,5,1,1,0,0,0,0]},{\"channel\":15,\"day1\":[85052,1272,85138,1052,111,10,7,2,2,2,0,0,0],\"day2\":[85023,1271,85109,1051,111,10,7,2,2,2,0,0,0],\"day3\":[84994,1271,85080,1051,111,10,7,2,2,2,0,0,0],\"day4\":[84962,1269,85047,1050,111,10,7,2,2,2,0,0,0],\"day5\":[84923,1265,85008,1046,111,10,7,2,2,2,0,0,0],\"day6\":[84896,1264,84981,1045,111,10,7,2,2,2,0,0,0],\"day7\":[84867,1262,84952,1043,111,10,7,2,2,2,0,0,0],\"day15\":[84698,1255,84781,1039,110,10,7,2,2,2,0,0,0]},{\"channel\":16,\"day1\":[15821,2674,15854,2345,239,35,16,5,1,0,0,0,0],\"day2\":[15803,2666,15836,2340,237,35,15,5,1,0,0,0,0],\"day3\":[15789,2661,15822,2336,236,35,15,5,1,0,0,0,0],\"day4\":[15780,2660,15813,2335,236,35,15,5,1,0,0,0,0],\"day5\":[15774,2654,15807,2332,233,35,15,5,1,0,0,0,0],\"day6\":[15768,2651,15801,2331,232,35,15,4,1,0,0,0,0],\"day7\":[15753,2646,15786,2328,231,35,14,4,1,0,0,0,0],\"day15\":[15632,2616,15665,2306,225,35,13,3,1,0,0,0,0]},{\"channel\":17,\"day1\":[14168,674,14184,642,12,2,1,1,0,0,0,0,0],\"day2\":[14154,672,14170,640,12,2,1,1,0,0,0,0,0],\"day3\":[14136,671,14152,639,12,2,1,1,0,0,0,0,0],\"day4\":[14121,670,14137,638,12,2,1,1,0,0,0,0,0],\"day5\":[14116,670,14132,638,12,2,1,1,0,0,0,0,0],\"day6\":[14106,669,14122,637,12,2,1,1,0,0,0,0,0],\"day7\":[14099,668,14115,636,12,2,1,1,0,0,0,0,0],\"day15\":[14000,660,14016,629,12,2,0,1,0,0,0,0,0]},{\"channel\":18,\"day1\":[26333,443,26360,360,43,5,6,2,0,0,0,0,0],\"day2\":[26212,436,26237,355,43,5,6,2,0,0,0,0,0],\"day3\":[26086,429,26111,349,42,5,6,2,0,0,0,0,0],\"day4\":[25969,426,25994,347,41,5,6,2,0,0,0,0,0],\"day5\":[25839,423,25864,344,41,5,6,2,0,0,0,0,0],\"day6\":[25681,419,25706,340,41,5,6,2,0,0,0,0,0],\"day7\":[25530,417,25555,338,41,5,6,2,0,0,0,0,0],\"day15\":[24295,390,24320,317,36,5,5,2,0,0,0,0,0]},{\"channel\":19,\"day1\":[1005,163,1027,66,44,9,13,4,2,1,1,1,0],\"day2\":[995,161,1017,66,42,9,13,4,2,1,1,1,0],\"day3\":[995,161,1017,66,42,9,13,4,2,1,1,1,0],\"day4\":[993,160,1015,66,42,9,12,4,2,1,1,1,0],\"day5\":[990,159,1012,65,42,9,12,4,2,1,1,1,0],\"day6\":[989,158,1011,65,41,9,12,4,2,1,1,1,0],\"day7\":[989,158,1011,65,41,9,12,4,2,1,1,1,0],\"day15\":[975,156,997,65,39,9,12,4,2,1,1,1,0]},{\"channel\":20,\"day1\":[1432,27,1441,15,2,1,0,0,0,0,0,0,0],\"day2\":[1431,27,1440,15,2,1,0,0,0,0,0,0,0],\"day3\":[1431,27,1440,15,2,1,0,0,0,0,0,0,0],\"day4\":[1430,27,1439,15,2,1,0,0,0,0,0,0,0],\"day5\":[1430,27,1439,15,2,1,0,0,0,0,0,0,0],\"day6\":[1430,27,1439,15,2,1,0,0,0,0,0,0,0],\"day7\":[1430,27,1439,15,2,1,0,0,0,0,0,0,0],\"day15\":[1430,27,1439,15,2,1,0,0,0,0,0,0,0]},{\"channel\":21,\"day1\":[683,17,685,7,3,3,1,1,0,0,0,0,0],\"day2\":[682,17,684,7,3,3,1,1,0,0,0,0,0],\"day3\":[682,17,684,7,3,3,1,1,0,0,0,0,0],\"day4\":[681,17,683,7,3,3,1,1,0,0,0,0,0],\"day5\":[681,17,683,7,3,3,1,1,0,0,0,0,0],\"day6\":[681,17,683,7,3,3,1,1,0,0,0,0,0],\"day7\":[681,17,683,7,3,3,1,1,0,0,0,0,0],\"day15\":[680,17,682,7,3,3,1,1,0,0,0,0,0]},{\"channel\":22,\"day1\":[16508,700,16516,678,12,1,1,0,0,0,0,0,0],\"day2\":[16504,700,16512,678,12,1,1,0,0,0,0,0,0],\"day3\":[16502,700,16510,678,12,1,1,0,0,0,0,0,0],\"day4\":[16491,700,16499,678,12,1,1,0,0,0,0,0,0],\"day5\":[16491,700,16499,678,12,1,1,0,0,0,0,0,0],\"day6\":[16489,700,16497,678,12,1,1,0,0,0,0,0,0],\"day7\":[16488,700,16496,678,12,1,1,0,0,0,0,0,0],\"day15\":[16458,696,16465,675,12,1,1,0,0,0,0,0,0]},{\"channel\":23,\"day1\":[36675,870,36749,734,47,8,5,2,0,0,0,0,0],\"day2\":[36642,869,36716,733,47,8,5,2,0,0,0,0,0],\"day3\":[36625,869,36699,733,47,8,5,2,0,0,0,0,0],\"day4\":[36610,869,36684,733,47,8,5,2,0,0,0,0,0],\"day5\":[36580,869,36654,733,47,8,5,2,0,0,0,0,0],\"day6\":[36553,869,36627,733,47,8,5,2,0,0,0,0,0],\"day7\":[36522,868,36595,733,47,8,5,2,0,0,0,0,0],\"day15\":[36241,864,36314,729,47,8,5,2,0,0,0,0,0]},{\"channel\":24,\"day1\":[30374,1783,30402,1729,24,0,2,0,0,0,0,0,0],\"day2\":[30371,1783,30399,1729,24,0,2,0,0,0,0,0,0],\"day3\":[30367,1783,30395,1729,24,0,2,0,0,0,0,0,0],\"day4\":[30364,1781,30392,1727,24,0,2,0,0,0,0,0,0],\"day5\":[30360,1781,30388,1727,24,0,2,0,0,0,0,0,0],\"day6\":[30357,1780,30385,1726,24,0,2,0,0,0,0,0,0],\"day7\":[30351,1780,30379,1726,24,0,2,0,0,0,0,0,0],\"day15\":[30318,1775,30346,1721,24,0,2,0,0,0,0,0,0]},{\"channel\":25,\"day1\":[20799,305,20826,246,19,0,10,1,1,1,0,0,0],\"day2\":[20528,299,20554,243,17,0,10,1,1,1,0,0,0],\"day3\":[20235,296,20260,241,17,0,10,1,1,1,0,0,0],\"day4\":[19938,293,19963,238,17,0,10,1,1,1,0,0,0],\"day5\":[19924,290,19949,236,17,0,9,1,1,1,0,0,0],\"day6\":[19893,288,19918,234,17,0,9,1,1,1,0,0,0],\"day7\":[19838,288,19863,234,17,0,9,1,1,1,0,0,0],\"day15\":[19029,275,19054,222,17,0,8,1,1,1,0,0,0]},{\"channel\":26,\"day1\":[629,154,654,52,35,10,11,14,5,1,0,1,0],\"day2\":[628,154,653,52,35,10,11,14,5,1,0,1,0],\"day3\":[626,153,651,51,35,10,11,14,5,1,0,1,0],\"day4\":[626,152,651,51,34,10,11,14,5,1,0,1,0],\"day5\":[626,152,651,51,34,10,11,14,5,1,0,1,0],\"day6\":[625,152,650,51,34,10,11,14,5,1,0,1,0],\"day7\":[625,152,650,51,34,10,11,14,5,1,0,1,0],\"day15\":[621,152,646,51,34,10,11,14,5,1,0,1,0]},{\"channel\":27,\"day1\":[23509,2666,23564,2540,60,4,7,0,0,0,0,0,0],\"day2\":[23506,2666,23561,2540,60,4,7,0,0,0,0,0,0],\"day3\":[23504,2666,23559,2540,60,4,7,0,0,0,0,0,0],\"day4\":[23501,2665,23555,2540,60,4,7,0,0,0,0,0,0],\"day5\":[23498,2665,23552,2540,60,4,7,0,0,0,0,0,0],\"day6\":[23496,2665,23550,2540,60,4,7,0,0,0,0,0,0],\"day7\":[23491,2664,23545,2539,60,4,7,0,0,0,0,0,0],\"day15\":[23444,2657,23498,2532,60,4,7,0,0,0,0,0,0]},{\"channel\":28,\"day1\":[14692,423,14729,339,39,7,1,0,0,0,0,0,0],\"day2\":[14676,421,14713,338,38,7,1,0,0,0,0,0,0],\"day3\":[14663,421,14700,338,38,7,1,0,0,0,0,0,0],\"day4\":[14650,421,14687,338,38,7,1,0,0,0,0,0,0],\"day5\":[14640,421,14677,338,38,7,1,0,0,0,0,0,0],\"day6\":[14629,421,14666,338,38,7,1,0,0,0,0,0,0],\"day7\":[14619,421,14656,338,38,7,1,0,0,0,0,0,0],\"day15\":[14527,418,14564,335,38,7,1,0,0,0,0,0,0]},{\"channel\":29,\"day1\":[18962,1049,18981,1006,20,4,0,0,0,0,0,0,0],\"day2\":[18948,1044,18967,1002,20,3,0,0,0,0,0,0,0],\"day3\":[18935,1044,18954,1002,20,3,0,0,0,0,0,0,0],\"day4\":[18926,1043,18945,1001,20,3,0,0,0,0,0,0,0],\"day5\":[18918,1041,18937,999,20,3,0,0,0,0,0,0,0],\"day6\":[18911,1041,18930,999,20,3,0,0,0,0,0,0,0],\"day7\":[18896,1040,18915,998,20,3,0,0,0,0,0,0,0],\"day15\":[18798,1038,18817,996,20,3,0,0,0,0,0,0,0]},{\"channel\":30,\"day1\":[1549,30,1558,14,5,1,1,0,0,0,0,0,0],\"day2\":[1545,30,1554,14,5,1,1,0,0,0,0,0,0],\"day3\":[1544,30,1553,14,5,1,1,0,0,0,0,0,0],\"day4\":[1544,30,1553,14,5,1,1,0,0,0,0,0,0],\"day5\":[1543,30,1552,14,5,1,1,0,0,0,0,0,0],\"day6\":[1542,30,1551,14,5,1,1,0,0,0,0,0,0],\"day7\":[1541,30,1550,14,5,1,1,0,0,0,0,0,0],\"day15\":[1533,29,1542,13,5,1,1,0,0,0,0,0,0]},{\"channel\":31,\"day1\":[2450,692,2574,273,173,34,45,29,9,4,1,0,0],\"day2\":[2447,690,2571,272,172,34,45,29,9,4,1,0,0],\"day3\":[2446,690,2570,272,172,34,45,29,9,4,1,0,0],\"day4\":[2444,688,2568,271,171,34,45,29,9,4,1,0,0],\"day5\":[2444,687,2568,270,171,34,45,29,9,4,1,0,0],\"day6\":[2444,687,2568,270,171,34,45,29,9,4,1,0,0],\"day7\":[2443,686,2567,270,171,34,45,29,8,4,1,0,0],\"day15\":[2435,680,2557,269,171,34,44,28,8,3,1,0,0]},{\"channel\":32,\"day1\":[123339,9019,123571,8180,296,150,124,27,7,2,1,0,0],\"day2\":[123327,9019,123559,8180,296,150,124,27,7,2,1,0,0],\"day3\":[123317,9019,123549,8180,296,150,124,27,7,2,1,0,0],\"day4\":[123310,9019,123542,8180,296,150,124,27,7,2,1,0,0],\"day5\":[123305,9016,123537,8178,295,150,124,27,7,2,1,0,0],\"day6\":[123293,9014,123525,8176,295,150,124,27,7,2,1,0,0],\"day7\":[123275,9013,123507,8176,295,150,124,27,6,2,1,0,0],\"day15\":[123129,8996,123360,8163,294,149,123,27,6,2,1,0,0]},{\"channel\":33,\"day1\":[1534,74,1557,38,9,3,1,0,0,0,0,0,0],\"day2\":[1521,72,1543,37,9,3,1,0,0,0,0,0,0],\"day3\":[1504,72,1526,37,9,3,1,0,0,0,0,0,0],\"day4\":[1487,71,1509,37,9,2,1,0,0,0,0,0,0],\"day5\":[1477,71,1499,37,9,2,1,0,0,0,0,0,0],\"day6\":[1468,71,1490,37,9,2,1,0,0,0,0,0,0],\"day7\":[1456,71,1478,37,9,2,1,0,0,0,0,0,0],\"day15\":[1357,70,1379,37,9,2,0,0,0,0,0,0,0]},{\"channel\":34,\"day1\":[77575,1900,77866,1379,184,34,6,4,1,0,0,0,1],\"day2\":[77567,1900,77858,1379,184,34,6,4,1,0,0,0,1],\"day3\":[77557,1898,77846,1379,184,34,6,4,1,0,0,0,1],\"day4\":[77546,1898,77835,1379,184,34,6,4,1,0,0,0,1],\"day5\":[77537,1898,77826,1379,184,34,6,4,1,0,0,0,1],\"day6\":[77520,1897,77809,1379,183,34,6,4,1,0,0,0,1],\"day7\":[77508,1895,77796,1378,183,34,6,4,1,0,0,0,1],\"day15\":[77343,1883,77631,1367,182,34,6,4,1,0,0,0,1]},{\"channel\":35,\"day1\":[106776,5760,107007,5107,264,91,49,14,2,1,1,0,0],\"day2\":[106657,5754,106888,5103,263,91,49,13,2,1,1,0,0],\"day3\":[106533,5744,106764,5094,262,91,49,13,2,1,1,0,0],\"day4\":[106371,5728,106601,5081,261,90,49,13,2,1,1,0,0],\"day5\":[106359,5727,106589,5080,261,90,49,13,2,1,1,0,0],\"day6\":[106339,5723,106569,5077,261,90,48,13,2,1,1,0,0],\"day7\":[106318,5721,106548,5075,261,90,48,13,2,1,1,0,0],\"day15\":[105958,5692,106186,5053,258,90,48,11,2,1,1,0,0]},{\"channel\":36,\"day1\":[10888,389,10898,341,31,6,1,0,0,0,0,0,0],\"day2\":[10888,387,10898,340,30,6,1,0,0,0,0,0,0],\"day3\":[10884,387,10894,340,30,6,1,0,0,0,0,0,0],\"day4\":[10882,387,10892,340,30,6,1,0,0,0,0,0,0],\"day5\":[10868,387,10878,340,30,6,1,0,0,0,0,0,0],\"day6\":[10865,387,10875,340,30,6,1,0,0,0,0,0,0],\"day7\":[10864,386,10874,340,30,5,1,0,0,0,0,0,0],\"day15\":[10850,384,10859,339,30,5,1,0,0,0,0,0,0]},{\"channel\":37,\"day1\":[1025,224,1063,88,51,21,17,5,4,0,0,0,0],\"day2\":[1025,223,1063,88,51,21,16,5,4,0,0,0,0],\"day3\":[1024,223,1062,88,51,21,16,5,4,0,0,0,0],\"day4\":[1024,223,1062,88,51,21,16,5,4,0,0,0,0],\"day5\":[1024,223,1062,88,51,21,16,5,4,0,0,0,0],\"day6\":[1024,223,1062,88,51,21,16,5,4,0,0,0,0],\"day7\":[1024,223,1062,88,51,21,16,5,4,0,0,0,0],\"day15\":[1021,222,1058,88,51,21,16,5,4,0,0,0,0]},{\"channel\":38,\"day1\":[2190,86,2193,75,7,0,1,0,0,0,0,0,0],\"day2\":[2188,86,2191,75,7,0,1,0,0,0,0,0,0],\"day3\":[2185,86,2188,75,7,0,1,0,0,0,0,0,0],\"day4\":[2183,86,2186,75,7,0,1,0,0,0,0,0,0],\"day5\":[2181,86,2184,75,7,0,1,0,0,0,0,0,0],\"day6\":[2179,84,2182,74,6,0,1,0,0,0,0,0,0],\"day7\":[2179,83,2182,73,6,0,1,0,0,0,0,0,0],\"day15\":[2159,82,2162,73,6,0,0,0,0,0,0,0,0]},{\"channel\":39,\"day1\":[43771,1000,43815,879,58,10,4,4,1,0,0,0,0],\"day2\":[43767,1000,43811,879,58,10,4,4,1,0,0,0,0],\"day3\":[43758,1000,43802,879,58,10,4,4,1,0,0,0,0],\"day4\":[43747,1000,43791,879,58,10,4,4,1,0,0,0,0],\"day5\":[43740,1000,43784,879,58,10,4,4,1,0,0,0,0],\"day6\":[43730,999,43774,879,57,10,4,4,1,0,0,0,0],\"day7\":[43724,998,43768,878,57,10,4,4,1,0,0,0,0],\"day15\":[43562,993,43605,874,57,10,4,4,1,0,0,0,0]},{\"channel\":40,\"day1\":[448,92,457,42,23,4,8,5,1,0,0,0,0],\"day2\":[448,92,457,42,23,4,8,5,1,0,0,0,0],\"day3\":[448,91,457,41,23,4,8,5,1,0,0,0,0],\"day4\":[448,91,457,41,23,4,8,5,1,0,0,0,0],\"day5\":[448,91,457,41,23,4,8,5,1,0,0,0,0],\"day6\":[448,91,457,41,23,4,8,5,1,0,0,0,0],\"day7\":[448,91,457,41,23,4,8,5,1,0,0,0,0],\"day15\":[447,89,456,39,23,4,8,5,1,0,0,0,0]},{\"channel\":41,\"day1\":[15,13,17,9,1,1,0,0,0,0,0,0,0],\"day2\":[15,13,17,9,1,1,0,0,0,0,0,0,0],\"day3\":[15,13,17,9,1,1,0,0,0,0,0,0,0],\"day4\":[15,12,17,9,1,0,0,0,0,0,0,0,0],\"day5\":[15,11,17,8,1,0,0,0,0,0,0,0,0],\"day6\":[15,11,17,8,1,0,0,0,0,0,0,0,0],\"day7\":[15,11,17,8,1,0,0,0,0,0,0,0,0],\"day15\":[15,11,17,8,1,0,0,0,0,0,0,0,0]},{\"channel\":42,\"day1\":[4434,213,4443,191,10,1,0,1,0,1,0,0,0],\"day2\":[4434,213,4443,191,10,1,0,1,0,1,0,0,0],\"day3\":[4434,213,4443,191,10,1,0,1,0,1,0,0,0],\"day4\":[4433,213,4442,191,10,1,0,1,0,1,0,0,0],\"day5\":[4432,213,4441,191,10,1,0,1,0,1,0,0,0],\"day6\":[4431,213,4440,191,10,1,0,1,0,1,0,0,0],\"day7\":[4431,213,4440,191,10,1,0,1,0,1,0,0,0],\"day15\":[4427,210,4436,188,10,1,0,1,0,1,0,0,0]},{\"channel\":43,\"day1\":[1885,49,1890,42,2,0,0,0,0,0,0,0,0],\"day2\":[1885,49,1890,42,2,0,0,0,0,0,0,0,0],\"day3\":[1885,49,1890,42,2,0,0,0,0,0,0,0,0],\"day4\":[1885,49,1890,42,2,0,0,0,0,0,0,0,0],\"day5\":[1885,49,1890,42,2,0,0,0,0,0,0,0,0],\"day6\":[1885,49,1890,42,2,0,0,0,0,0,0,0,0],\"day7\":[1884,49,1889,42,2,0,0,0,0,0,0,0,0],\"day15\":[1883,48,1888,41,2,0,0,0,0,0,0,0,0]},{\"channel\":44,\"day1\":[1999,38,2000,36,0,0,1,0,0,0,0,0,0],\"day2\":[1999,38,2000,36,0,0,1,0,0,0,0,0,0],\"day3\":[1999,38,2000,36,0,0,1,0,0,0,0,0,0],\"day4\":[1999,38,2000,36,0,0,1,0,0,0,0,0,0],\"day5\":[1999,38,2000,36,0,0,1,0,0,0,0,0,0],\"day6\":[1999,38,2000,36,0,0,1,0,0,0,0,0,0],\"day7\":[1999,38,2000,36,0,0,1,0,0,0,0,0,0],\"day15\":[1996,38,1997,36,0,0,1,0,0,0,0,0,0]},{\"channel\":45,\"day1\":[296,59,307,25,10,3,5,4,1,0,0,0,0],\"day2\":[296,59,307,25,10,3,5,4,1,0,0,0,0],\"day3\":[296,59,307,25,10,3,5,4,1,0,0,0,0],\"day4\":[296,59,307,25,10,3,5,4,1,0,0,0,0],\"day5\":[296,59,307,25,10,3,5,4,1,0,0,0,0],\"day6\":[296,59,307,25,10,3,5,4,1,0,0,0,0],\"day7\":[296,59,307,25,10,3,5,4,1,0,0,0,0],\"day15\":[296,59,307,25,10,3,5,4,1,0,0,0,0]},{\"channel\":46,\"day1\":[114,79,119,26,25,7,9,6,1,0,0,0,0],\"day2\":[114,79,119,26,25,7,9,6,1,0,0,0,0],\"day3\":[114,79,119,26,25,7,9,6,1,0,0,0,0],\"day4\":[114,79,119,26,25,7,9,6,1,0,0,0,0],\"day5\":[114,79,119,26,25,7,9,6,1,0,0,0,0],\"day6\":[114,79,119,26,25,7,9,6,1,0,0,0,0],\"day7\":[114,79,119,26,25,7,9,6,1,0,0,0,0],\"day15\":[114,79,119,26,25,7,9,6,1,0,0,0,0]},{\"channel\":47,\"day1\":[256,9,257,2,5,1,0,0,0,0,0,0,0],\"day2\":[256,9,257,2,5,1,0,0,0,0,0,0,0],\"day3\":[256,9,257,2,5,1,0,0,0,0,0,0,0],\"day4\":[256,9,257,2,5,1,0,0,0,0,0,0,0],\"day5\":[256,9,257,2,5,1,0,0,0,0,0,0,0],\"day6\":[256,9,257,2,5,1,0,0,0,0,0,0,0],\"day7\":[256,9,257,2,5,1,0,0,0,0,0,0,0],\"day15\":[256,9,257,2,5,1,0,0,0,0,0,0,0]},{\"channel\":48,\"day1\":[887,12,890,6,1,1,0,1,0,0,0,0,0],\"day2\":[887,12,890,6,1,1,0,1,0,0,0,0,0],\"day3\":[887,12,890,6,1,1,0,1,0,0,0,0,0],\"day4\":[887,12,890,6,1,1,0,1,0,0,0,0,0],\"day5\":[887,12,890,6,1,1,0,1,0,0,0,0,0],\"day6\":[887,12,890,6,1,1,0,1,0,0,0,0,0],\"day7\":[887,12,890,6,1,1,0,1,0,0,0,0,0],\"day15\":[887,12,890,6,1,1,0,1,0,0,0,0,0]},{\"channel\":49,\"day1\":[246,18,251,9,2,0,2,0,0,0,0,0,0],\"day2\":[246,18,251,9,2,0,2,0,0,0,0,0,0],\"day3\":[246,18,251,9,2,0,2,0,0,0,0,0,0],\"day4\":[246,18,251,9,2,0,2,0,0,0,0,0,0],\"day5\":[246,18,251,9,2,0,2,0,0,0,0,0,0],\"day6\":[246,18,251,9,2,0,2,0,0,0,0,0,0],\"day7\":[246,18,251,9,2,0,2,0,0,0,0,0,0],\"day15\":[246,18,251,9,2,0,2,0,0,0,0,0,0]},{\"channel\":50,\"day1\":[210,4,210,2,1,0,0,1,0,0,0,0,0],\"day2\":[210,4,210,2,1,0,0,1,0,0,0,0,0],\"day3\":[210,4,210,2,1,0,0,1,0,0,0,0,0],\"day4\":[210,4,210,2,1,0,0,1,0,0,0,0,0],\"day5\":[210,4,210,2,1,0,0,1,0,0,0,0,0],\"day6\":[210,4,210,2,1,0,0,1,0,0,0,0,0],\"day7\":[210,4,210,2,1,0,0,1,0,0,0,0,0],\"day15\":[210,4,210,2,1,0,0,1,0,0,0,0,0]},{\"channel\":51,\"day1\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day2\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day3\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day4\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day5\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day6\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day7\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day15\":[1,0,1,0,0,0,0,0,0,0,0,0,0]},{\"channel\":52,\"day1\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day2\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day3\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day4\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day5\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day6\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day7\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day15\":[1,0,1,0,0,0,0,0,0,0,0,0,0]},{\"channel\":53,\"day1\":[3,0,3,0,0,0,0,0,0,0,0,0,0],\"day2\":[3,0,3,0,0,0,0,0,0,0,0,0,0],\"day3\":[3,0,3,0,0,0,0,0,0,0,0,0,0],\"day4\":[3,0,3,0,0,0,0,0,0,0,0,0,0],\"day5\":[3,0,3,0,0,0,0,0,0,0,0,0,0],\"day6\":[3,0,3,0,0,0,0,0,0,0,0,0,0],\"day7\":[3,0,3,0,0,0,0,0,0,0,0,0,0],\"day15\":[3,0,3,0,0,0,0,0,0,0,0,0,0]},{\"channel\":54,\"day1\":[51,2,52,1,0,0,0,0,0,0,0,0,0],\"day2\":[51,2,52,1,0,0,0,0,0,0,0,0,0],\"day3\":[51,2,52,1,0,0,0,0,0,0,0,0,0],\"day4\":[51,2,52,1,0,0,0,0,0,0,0,0,0],\"day5\":[51,2,52,1,0,0,0,0,0,0,0,0,0],\"day6\":[51,2,52,1,0,0,0,0,0,0,0,0,0],\"day7\":[51,2,52,1,0,0,0,0,0,0,0,0,0],\"day15\":[51,2,52,1,0,0,0,0,0,0,0,0,0]},{\"channel\":55,\"day1\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day2\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day3\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day4\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day5\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day6\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day7\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day15\":[1,0,1,0,0,0,0,0,0,0,0,0,0]},{\"channel\":56,\"day1\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day2\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day3\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day4\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day5\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day6\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day7\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day15\":[1,0,1,0,0,0,0,0,0,0,0,0,0]},{\"channel\":57,\"day1\":[6,0,6,0,0,0,0,0,0,0,0,0,0],\"day2\":[6,0,6,0,0,0,0,0,0,0,0,0,0],\"day3\":[6,0,6,0,0,0,0,0,0,0,0,0,0],\"day4\":[6,0,6,0,0,0,0,0,0,0,0,0,0],\"day5\":[6,0,6,0,0,0,0,0,0,0,0,0,0],\"day6\":[6,0,6,0,0,0,0,0,0,0,0,0,0],\"day7\":[6,0,6,0,0,0,0,0,0,0,0,0,0],\"day15\":[6,0,6,0,0,0,0,0,0,0,0,0,0]},{\"channel\":58,\"day1\":[137,0,137,0,0,0,0,0,0,0,0,0,0],\"day2\":[137,0,137,0,0,0,0,0,0,0,0,0,0],\"day3\":[137,0,137,0,0,0,0,0,0,0,0,0,0],\"day4\":[137,0,137,0,0,0,0,0,0,0,0,0,0],\"day5\":[137,0,137,0,0,0,0,0,0,0,0,0,0],\"day6\":[137,0,137,0,0,0,0,0,0,0,0,0,0],\"day7\":[137,0,137,0,0,0,0,0,0,0,0,0,0],\"day15\":[137,0,137,0,0,0,0,0,0,0,0,0,0]},{\"channel\":59,\"day1\":[2,0,2,0,0,0,0,0,0,0,0,0,0],\"day2\":[2,0,2,0,0,0,0,0,0,0,0,0,0],\"day3\":[2,0,2,0,0,0,0,0,0,0,0,0,0],\"day4\":[2,0,2,0,0,0,0,0,0,0,0,0,0],\"day5\":[2,0,2,0,0,0,0,0,0,0,0,0,0],\"day6\":[2,0,2,0,0,0,0,0,0,0,0,0,0],\"day7\":[2,0,2,0,0,0,0,0,0,0,0,0,0],\"day15\":[2,0,2,0,0,0,0,0,0,0,0,0,0]},{\"channel\":60,\"day1\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day2\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day3\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day4\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day5\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day6\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day7\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day15\":[1,0,1,0,0,0,0,0,0,0,0,0,0]},{\"channel\":61,\"day1\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day2\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day3\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day4\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day5\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day6\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day7\":[1,0,1,0,0,0,0,0,0,0,0,0,0],\"day15\":[1,0,1,0,0,0,0,0,0,0,0,0,0]},{\"channel\":62,\"day1\":[10,0,10,0,0,0,0,0,0,0,0,0,0],\"day2\":[10,0,10,0,0,0,0,0,0,0,0,0,0],\"day3\":[10,0,10,0,0,0,0,0,0,0,0,0,0],\"day4\":[10,0,10,0,0,0,0,0,0,0,0,0,0],\"day5\":[10,0,10,0,0,0,0,0,0,0,0,0,0],\"day6\":[10,0,10,0,0,0,0,0,0,0,0,0,0],\"day7\":[10,0,10,0,0,0,0,0,0,0,0,0,0],\"day15\":[10,0,10,0,0,0,0,0,0,0,0,0,0]}]";

            var list = JsonConvert.DeserializeObject<List<testModel>>(json);
             

            //# 清理历史数据
            db.Deleteable<testModel>().ExecuteCommand();


            db.Insertable(list).ExecuteCommand();

            //# 写入完成之后请比对上面list变量和数据库
            var data =   db.Queryable<testModel>()
                .OrderBy(it => it.channel).ToList();
            int i = 0;
            foreach (var item in data)
            {
                var tmpItem = list?.Find(x => x.channel == item.channel);
                if (tmpItem != null)
                {
                    var str1 = JsonConvert.SerializeObject(tmpItem.day1);
                    var str2 = JsonConvert.SerializeObject(item.day1);
                    if (str1 != str2)
                    {
                        throw new Exception("unit error"+i);
                    }
                }
            }
        }
    }

    [SugarTable("unitSq1ladfadsfa")]
    public class testModel
    {
        [SugarColumn(IsPrimaryKey = true)] public int channel { get; set; }
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day1 { get; set; } = new int[13];
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day2 { get; set; } = new int[13];
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day3 { get; set; } = new int[13];
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day4 { get; set; } = new int[13];
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day5 { get; set; } = new int[13];
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day6 { get; set; } = new int[13];
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day7 { get; set; } = new int[13];
        [SugarColumn(IsArray = true, ColumnDataType = "int[]")] public int[] day15 { get; set; } = new int[13];
    }

}